<template>
    <div>
        登录
    <button @click="Login">登录</button>    
    </div>

    
</template>
<script>
export default {
  data() {
    return {};
  },
  mounted() {
    // console.log(this.$router.currentRoute.query.redirect);
  },
  methods: {
    Login() {
      window.localStorage.setItem("user", "456");
      //   location.href = this.$router.currentRoute.query.redirect
    //   console.log(this.$router.currentRoute.query);
        this.$router.push({
          path: `${this.$router.currentRoute.query.redirect}`
        });
    }
  }
};
</script>
<style scoped>
</style>


